package com.tudouji.project.bill.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tudouji.framework.aspectj.lang.annotation.Excel;
import com.tudouji.framework.web.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 入库单对象 whinform
 * 
 * @author wf
 * @date 2021-01-07
 */
@Data
public class Whinform extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @Excel(name = "入库单编号")
    private String formno;

    @Excel(name = "订单编号")
    private String businesscode;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "入库日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createdate;

    @Excel(name = "入库类型")
    private String whintypeName;

    /** 组织名称 */
    @Excel(name = "库存组织")
    private String orgname;

    private String orgFullName;

    @Excel(name = "库房")
    private String srname;

    @Excel(name = "库间")
    private String shname;

    @Excel(name = "产品")
    private String productname;

    @Excel(name = "规格")
    private String spename;

    @Excel(name = "重量")
    private BigDecimal weight;

    @Excel(name = "单位")
    private String stockunit;

    /** 结算组织名称 */
    @Excel(name = "结算组织")
    private String settlOrgName;

    @Excel(name = "供应商名称")
    private String supplierName;

    @Excel(name = "操作人")
    private String operator;

    private String shrguid;

    private List<Whinformitem> items;

    private String spid;

    /** 主键 */
    private String guid;

    /** 编号 */


    /** 批次id */
    private String pbguid;

    /** 货运单id */
    private String foguid;

    /** 库房id */
    private String storermguid;

    /** 仓库id */
    private String storehguid;

    /** 仓库编码 */
    private String storehcode;

    /** 货品id */
    private String productid;


    /** 入库数量 */
    private BigDecimal qty;

    /** 数量单位(吨) */
    private String unit;

    /** 货品单价 */
    private BigDecimal price;

    /** 总价 */
    private BigDecimal amount;

    /** 种植户id */
    private String puserguid;

    /** 种植户名称 */
    private String pusername;

    /** 车牌号 */
    private String carcode;

    /** 司机名称 */
    private String drviername;

    /** 司机电话 */
    private String driverphone;

    /** 入库单类型 */
    private Integer whintype;

    /** 组织guid */
    private String orgguid;





    /** 结算组织id */
    private String settlOrgId;



    /** 供应商id */
    private Long supplierId;

    /** 供应商名称 */


    /** 1-人民币 2-美金 */
    private Integer currency;
    /** 操作人id */
    private String operatorid;



    /** 最后修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastupdate;

    private List<Whinformitem> whinformitemList;

    /** id */
    private Long autoid;

    private Integer dataNum;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date beginCreatedate;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endCreatedate;

    private String types;

    //条件
    private String conditions;


    private String departmentid;

    private String strname;

    private String qaformRsult;;

    private String [] srguids;

    private Integer isCopytoKD;

    private Integer notisCopytoKD;

    private String [] orderids;

    //渠道类型
    private String channel;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Whinform whinform = (Whinform) o;
        return autoid.equals(whinform.autoid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(autoid);
    }
}
